import {Sex} from './t04-自定义类型type'

class Person{
    //属性
    name:string;
    age:number;
    sex:Sex;
    //构造函数
    constructor(name:string,age:number,sex:Sex){
        this.name=name;
        this.age=age;
        this.sex=sex;
    }
}

let p1 = new Person('张三',16,Sex.男);
var p2 = new Person('张三',16,Sex.男);
const p3 = new Person('张三',16,Sex.男);


class Student extends Person{

}

class Teacher extends Person{

}

const p4 = new Student('张三',16,Sex.男);
const p5 = new Teacher('张三',16,Sex.男);